// 图片回显
import dayjs from "dayjs";

const baseURL = import.meta.env.VITE_APP_API_URL
import Cookies from 'js-cookie'

export const echoImage = (url) => {
  if (!url) {
    return ''
  }
  return baseURL + url
}
//设置Cookie
export const setCookie = (key, value, expireHours = 3) => {
  Cookies.set(key, value, {expires: dayjs().add(expireHours, 'hours').toDate()})
}
